Companies are investing heavily in complex injectables, respiratory therapies and biosimilars to improve margins and diversify portfolios.